package org.slf4j.impl;

import org.slf4j.Logger;
import org.slf4j.Marker;

import com.db.logging.LogLevel;

/**
 * @author Alexander Kotov (kotov.alex.22@gmail.com)
 */
public class LoggerAdapter implements Logger{
    private final com.db.logging.Logger logger;

    public LoggerAdapter(com.db.logging.Logger logger) {
        this.logger = logger;
    }

    @Override
    public String getName() {
        return logger.getLoggerName();
    }

    @Override
    public boolean isTraceEnabled() {
        return logger.getLogLevel().contains(LogLevel.TRACE);
    }

    @Override
    public void trace(String s) {
        logger.log(LogLevel.TRACE, s);
    }

    @Override
    public void trace(String s, Object o) {
        logger.log(LogLevel.TRACE, s, o);
    }

    @Override
    public void trace(String s, Object o, Object o2) {
        logger.log(LogLevel.TRACE, s, o, o2);
    }

    @Override
    public void trace(String s, Object... objects) {
        logger.log(LogLevel.TRACE, s, objects);
    }

    @Override
    public void trace(String s, Throwable throwable) {
        logger.log(LogLevel.TRACE, s);
    }

    @Override
    public boolean isTraceEnabled(Marker marker) {
        return logger.getLogLevel().contains(LogLevel.TRACE);
    }

    @Override
    public void trace(Marker marker, String s) {
        logger.log(LogLevel.TRACE, s);
    }

    @Override
    public void trace(Marker marker, String s, Object o) {
        logger.log(LogLevel.TRACE, s, o);
    }

    @Override
    public void trace(Marker marker, String s, Object o, Object o2) {
        logger.log(LogLevel.TRACE, s, o, o2);
    }

    @Override
    public void trace(Marker marker, String s, Object... objects) {
        logger.log(LogLevel.TRACE, s, objects);
    }

    @Override
    public void trace(Marker marker, String s, Throwable throwable) {
        logger.log(LogLevel.TRACE, s);
    }

    @Override
    public boolean isDebugEnabled() {
        return logger.getLogLevel().contains(LogLevel.DEBUG);
    }

    @Override
    public void debug(String s) {
        logger.log(LogLevel.DEBUG, s);
    }

    @Override
    public void debug(String s, Object o) {
        logger.log(LogLevel.DEBUG, s, o);
    }

    @Override
    public void debug(String s, Object o, Object o2) {
        logger.log(LogLevel.DEBUG, s, o, o2);
    }

    @Override
    public void debug(String s, Object... objects) {
        logger.log(LogLevel.DEBUG, s, objects);
    }

    @Override
    public void debug(String s, Throwable throwable) {
        logger.log(LogLevel.DEBUG, s);
    }

    @Override
    public boolean isDebugEnabled(Marker marker) {
        return logger.getLogLevel().contains(LogLevel.DEBUG);
    }

    @Override
    public void debug(Marker marker, String s) {
        logger.log(LogLevel.DEBUG, s);
    }

    @Override
    public void debug(Marker marker, String s, Object o) {
        logger.log(LogLevel.DEBUG, s, o);
    }

    @Override
    public void debug(Marker marker, String s, Object o, Object o2) {
        logger.log(LogLevel.DEBUG, s, o, o2);
    }

    @Override
    public void debug(Marker marker, String s, Object... objects) {
        logger.log(LogLevel.DEBUG, s, objects);
    }

    @Override
    public void debug(Marker marker, String s, Throwable throwable) {
        logger.log(LogLevel.DEBUG, s);
    }

    @Override
    public boolean isInfoEnabled() {
        return logger.getLogLevel().contains(LogLevel.INFO);
    }

    @Override
    public void info(String s) {
        logger.log(LogLevel.INFO, s);
    }

    @Override
    public void info(String s, Object o) {
        logger.log(LogLevel.INFO, s, o);
    }

    @Override
    public void info(String s, Object o, Object o2) {
        logger.log(LogLevel.INFO, s, o, o2);
    }

    @Override
    public void info(String s, Object... objects) {
        logger.log(LogLevel.INFO, s, objects);
    }

    @Override
    public void info(String s, Throwable throwable) {
        logger.log(LogLevel.INFO, s);
    }

    @Override
    public boolean isInfoEnabled(Marker marker) {
        return logger.getLogLevel().contains(LogLevel.INFO);
    }

    @Override
    public void info(Marker marker, String s) {
        logger.log(LogLevel.INFO, s);
    }

    @Override
    public void info(Marker marker, String s, Object o) {
        logger.log(LogLevel.INFO, s, o);
    }

    @Override
    public void info(Marker marker, String s, Object o, Object o2) {
        logger.log(LogLevel.INFO, s, o, o2);
    }

    @Override
    public void info(Marker marker, String s, Object... objects) {
        logger.log(LogLevel.INFO, s, objects);
    }

    @Override
    public void info(Marker marker, String s, Throwable throwable) {
        logger.log(LogLevel.INFO, s);
    }

    @Override
    public boolean isWarnEnabled() {
        return logger.getLogLevel().contains(LogLevel.WARN);
    }

    @Override
    public void warn(String s) {
        logger.log(LogLevel.WARN, s);
    }

    @Override
    public void warn(String s, Object o) {
        logger.log(LogLevel.WARN, s, o);
    }

    @Override
    public void warn(String s, Object... objects) {
        logger.log(LogLevel.WARN, s, objects);
    }

    @Override
    public void warn(String s, Object o, Object o2) {
        logger.log(LogLevel.WARN, s, o, o2);
    }

    @Override
    public void warn(String s, Throwable throwable) {
        logger.log(LogLevel.WARN, s);
    }

    @Override
    public boolean isWarnEnabled(Marker marker) {
        return logger.getLogLevel().contains(LogLevel.WARN);
    }

    @Override
    public void warn(Marker marker, String s) {
        logger.log(LogLevel.WARN, s);
    }

    @Override
    public void warn(Marker marker, String s, Object o) {
        logger.log(LogLevel.WARN, s, o);
    }

    @Override
    public void warn(Marker marker, String s, Object o, Object o2) {
        logger.log(LogLevel.WARN, s, o, o2);
    }

    @Override
    public void warn(Marker marker, String s, Object... objects) {
        logger.log(LogLevel.WARN, s, objects);
    }

    @Override
    public void warn(Marker marker, String s, Throwable throwable) {
        logger.log(LogLevel.WARN, s);
    }

    @Override
    public boolean isErrorEnabled() {
        return logger.getLogLevel().contains(LogLevel.ERROR);
    }

    @Override
    public void error(String s) {
        logger.log(LogLevel.ERROR, s);
    }

    @Override
    public void error(String s, Object o) {
        logger.log(LogLevel.ERROR, s, o);
    }

    @Override
    public void error(String s, Object o, Object o2) {
        logger.log(LogLevel.ERROR, s, o, o2);
    }

    @Override
    public void error(String s, Object... objects) {
        logger.log(LogLevel.ERROR, s, objects);
    }

    @Override
    public void error(String s, Throwable throwable) {
        logger.log(LogLevel.ERROR, s);
    }

    @Override
    public boolean isErrorEnabled(Marker marker) {
        return logger.getLogLevel().contains(LogLevel.ERROR);
    }

    @Override
    public void error(Marker marker, String s) {
        logger.log(LogLevel.ERROR, s);
    }

    @Override
    public void error(Marker marker, String s, Object o) {
        logger.log(LogLevel.ERROR, s, o);
    }

    @Override
    public void error(Marker marker, String s, Object o, Object o2) {
        logger.log(LogLevel.ERROR, s, o, o2);
    }

    @Override
    public void error(Marker marker, String s, Object... objects) {
        logger.log(LogLevel.ERROR, s, objects);
    }

    @Override
    public void error(Marker marker, String s, Throwable throwable) {
        logger.log(LogLevel.ERROR, s);
    }
}
